
####animationscript function main#####
# data/varie/FX/blood/flash.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

	if(frame==11)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/nulla.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if (frame==1)

	{

	killentity(self);

	}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/maxmagFX/maxmagFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

//void frame = getentityproperty (self, "animpos");

if (frame==25)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/dust/rundust.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if (frame==10)

	{

	killentity(self);

	}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/block/block.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

//int frame = getentityproperty(self, "animpos");

	if (frame==8)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/blood/blood.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

	if(frame==11)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/blood/chomp.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

	if(frame==4)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/caduta/caduta.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

//int frame = getentityproperty(self, "animpos");

	if (frame==5)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/button/button.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if (frame==18)

	{

	killentity(self);

	}

        return;
    }

}

####animationscript function main#####
# data/varie/dust/fumocav.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self=getlocalvar("self");

if (frame==5)

	{

	killentity(self);

	}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/admagFX/admagFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if (frame==22)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/powup/powFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if (frame==22)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/bollaFX/bollaFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if (frame==9)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/bollaFX/bollaFX2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if (frame==14)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/fire/burnfire.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

int x = getentityproperty (self, "x");

int a = getentityproperty(self, "a");

int z = getentityproperty(self, "z");

int lx = openborvariant("xpos");

int dir = getentityproperty(self, "direction");

if(frame==1)

{

clearspawnentry();

setspawnentry("coords", x-lx, z+1, 80);

setspawnentry("name", "burnfumo");

//setspawnentry("flip", dir);

spawn();

}



if(frame==14)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/FX/fire/burnfumo.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

	if(frame==9)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/utility/quake.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if (frame==1)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/utility/quake2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if (frame==1)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/utility/soundfx.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if (frame==1)

{

killentity(self);

}

        return;
    }
    if(animnum==82)
    {


void self = getlocalvar("self");

if (frame==1)

{

killentity(self);

}

        return;
    }
    if(animnum==83)
    {


void self = getlocalvar("self");

if (frame==1)

{

killentity(self);

}

        return;
    }
    if(animnum==84)
    {


void self = getlocalvar("self");

if (frame==1)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/utility/nloopsnd.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if (frame==1)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/chars/ax/ax.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==1)
        {
            init();

        }
        if(frame==1)
        {
            dorme();

        }
        return;
    }
    if(animnum==104)
    {
        if(frame==0)
        {
            fishadj();

        }
        if(frame==0)
        {
            init();

        }
        if(frame==1)
        {
            respawn();

        }
        return;
    }
    if(animnum==0)
    {
        if(frame==0)
        {
            grounden();

        }
        return;
    }
    if(animnum==36)
    {
        if(frame==1)
        {
            rundust();

        }
        if(frame==3)
        {
            rundust();

        }
        if(frame==5)
        {
            rundust();

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==0)
        {
            thiefk();

        }
        if(frame==1)
        {
            contrast();

        }
        return;
    }
    if(animnum==82)
    {
        if(frame==1)
        {
            cont_rel();

        }
        return;
    }
    if(animnum==9)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==10)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK2"));

        }
        return;
    }
    if(animnum==161)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK2"));

        }
        return;
    }
    if(animnum==162)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==163)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK2"));

        }
        return;
    }
    if(animnum==165)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==84)
    {
        if(frame==0)
        {
            rage();

        }
        if(frame==0)
        {
            fx("axat");

        }
        return;
    }
    if(animnum==17)
    {
        if(frame==0)
        {
            th_turn();

        }
        return;
    }
    if(animnum==20)
    {
        if(frame==0)
        {
            mag_ex();

        }
        if(frame==0)
        {
            ivartre(0);

        }
        if(frame==0)
        {
            inv(600);

        }
        if(frame==0)
        {
            chngani(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==1)
        {
            magic();

        }
        if(frame==9)
        {
            nomagic();

        }
        return;
    }
    if(animnum==83)
    {
        if(frame==0)
        {
            nomagic();

        }
        return;
    }

}

####animationscript function main#####
# data/chars/tyris/tyris.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==1)
        {
            init();

        }
        if(frame==2)
        {
            dorme();

        }
        return;
    }
    if(animnum==104)
    {
        if(frame==1)
        {
            fishadj();

        }
        if(frame==1)
        {
            init();

        }
        if(frame==2)
        {
            respawn();

        }
        return;
    }
    if(animnum==36)
    {
        if(frame==1)
        {
            rundust();

        }
        if(frame==3)
        {
            rundust();

        }
        if(frame==5)
        {
            rundust();

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==0)
        {
            thiefk();

        }
        if(frame==2)
        {
            contrast();

        }
        return;
    }
    if(animnum==8)
    {
        if(frame==0)
        {
            combofns(24, openborconstant("ANI_ATTACK4"));

        }
        return;
    }
    if(animnum==9)
    {
        if(frame==0)
        {
            combofns(18, openborconstant("ANI_ATTACK5"));

        }
        return;
    }
    if(animnum==82)
    {
        if(frame==1)
        {
            cont_rel();

        }
        return;
    }
    if(animnum==162)
    {
        if(frame==0)
        {
            combofns(24, openborconstant("ANI_ATTACK4"));

        }
        return;
    }
    if(animnum==163)
    {
        if(frame==0)
        {
            combofns(18, openborconstant("ANI_ATTACK5"));

        }
        return;
    }
    if(animnum==84)
    {
        if(frame==0)
        {
            rage();

        }
        if(frame==0)
        {
            fx("tyat");

        }
        return;
    }
    if(animnum==17)
    {
        if(frame==0)
        {
            grabback();

        }
        return;
    }
    if(animnum==20)
    {
        if(frame==0)
        {
            mag_ex();

        }
        if(frame==0)
        {
            ivartre(0);

        }
        if(frame==0)
        {
            inv(600);

        }
        if(frame==0)
        {
            chngani(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==1)
        {
            magic();

        }
        if(frame==9)
        {
            nomagic();

        }
        return;
    }
    if(animnum==83)
    {
        if(frame==0)
        {
            nomagic();

        }
        return;
    }

}

####animationscript function main#####
# data/chars/gilius/gilius.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==1)
        {
            init();

        }
        if(frame==2)
        {
            dorme();

        }
        return;
    }
    if(animnum==104)
    {
        if(frame==1)
        {
            fishadj();

        }
        if(frame==1)
        {
            init();

        }
        if(frame==2)
        {
            respawn();

        }
        return;
    }
    if(animnum==36)
    {
        if(frame==1)
        {
            rundust();

        }
        if(frame==3)
        {
            rundust();

        }
        if(frame==5)
        {
            rundust();

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==0)
        {
            thiefk();

        }
        return;
    }
    if(animnum==8)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==9)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==10)
    {
        if(frame==0)
        {
            combofns(25, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==162)
    {
        if(frame==0)
        {
            combofns(35, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==163)
    {
        if(frame==0)
        {
            combofns(35, openborconstant("ANI_ATTACK8"));

        }
        return;
    }
    if(animnum==84)
    {
        if(frame==0)
        {
            rage();

        }
        if(frame==0)
        {
            fx("geat");

        }
        return;
    }
    if(animnum==17)
    {
        if(frame==1)
        {
            saltagiu();

        }
        if(frame==2)
        {
            saltagiu();

        }
        if(frame==3)
        {
            saltagiu();

        }
        if(frame==4)
        {
            saltagiu();

        }
        if(frame==5)
        {
            saltagiu();

        }
        return;
    }
    if(animnum==18)
    {
        if(frame==1)
        {
            saltagiu();

        }
        if(frame==2)
        {
            saltagiu();

        }
        if(frame==3)
        {
            saltagiu();

        }
        if(frame==4)
        {
            saltagiu();

        }
        if(frame==5)
        {
            saltagiu();

        }
        return;
    }
    if(animnum==20)
    {
        if(frame==0)
        {
            mag_ex();

        }
        if(frame==0)
        {
            ivartre(0);

        }
        if(frame==0)
        {
            inv(600);

        }
        if(frame==0)
        {
            chngani(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==1)
        {
            magic();

        }
        if(frame==9)
        {
            nomagic();

        }
        return;
    }
    if(animnum==83)
    {
        if(frame==0)
        {
            nomagic();

        }
        return;
    }

}

####animationscript function main#####
# data/chars/adder/adder.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==1)
        {
            init();

        }
        if(frame==2)
        {
            dorme();

        }
        return;
    }
    if(animnum==104)
    {
        if(frame==1)
        {
            fishadj();

        }
        if(frame==1)
        {
            init();

        }
        if(frame==2)
        {
            respawn();

        }
        return;
    }
    if(animnum==36)
    {
        if(frame==1)
        {
            rundust();

        }
        if(frame==3)
        {
            rundust();

        }
        if(frame==5)
        {
            rundust();

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==0)
        {
            thiefk();

        }
        return;
    }
    if(animnum==8)
    {
        if(frame==0)
        {
            combofns(55, openborconstant("ANI_ATTACK4"));

        }
        return;
    }
    if(animnum==9)
    {
        if(frame==0)
        {
            combofns(30, openborconstant("ANI_ATTACK9"));

        }
        return;
    }
    if(animnum==161)
    {
        if(frame==0)
        {
            combofns(55, openborconstant("ANI_ATTACK4"));

        }
        return;
    }
    if(animnum==163)
    {
        if(frame==0)
        {
            combofns(30, openborconstant("ANI_ATTACK9"));

        }
        return;
    }
    if(animnum==164)
    {
        if(frame==0)
        {
            combofns(30, openborconstant("ANI_ATTACK9"));

        }
        return;
    }
    if(animnum==84)
    {
        if(frame==0)
        {
            rage();

        }
        if(frame==0)
        {
            fx("adat");

        }
        return;
    }
    if(animnum==17)
    {
        if(frame==0)
        {
            oldgratt();

        }
        return;
    }
    if(animnum==20)
    {
        if(frame==0)
        {
            mag_ex();

        }
        if(frame==0)
        {
            ivartre(0);

        }
        if(frame==0)
        {
            inv(600);

        }
        if(frame==0)
        {
            chngani(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==1)
        {
            magic();

        }
        if(frame==9)
        {
            nomagic();

        }
        return;
    }
    if(animnum==83)
    {
        if(frame==0)
        {
            nomagic();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/ax/ax_mag1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if(frame<=7)

{

changeentityproperty(self, "velocity", 1, 0, -10);

}

if(frame>7)

{

changeentityproperty(self, "velocity", 0, 0, 0);

}



//void self = getlocalvar("self");

if (frame==13)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/ax/axmfake1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            meteor();

        }
        if(frame==1)
        {
            meteor();

        }
        if(frame==2)
        {
            meteor();

        }
        if(frame==3)
        {
            meteor();

        }
        if(frame==4)
        {
            meteor();

        }
        if(frame==5)
        {
            meteor();

        }
        if(frame==6)
        {
            meteor();

        }
        if(frame==7)
        {
            meteor();

        }
        if(frame==8)
        {
            damage(70, 20, "Ax");

        }
        if(frame==8)
        {
            meteor();

        }
        if(frame==9)
        {
            meteor();

        }
        if(frame==10)
        {
            meteor();

        }
        if(frame==11)
        {
            meteor();

        }
        if(frame==11)
        {
            ivartre(1);

        }
        if(frame==12)
        {
            meteor();

        }
        if(frame==13)
        {
            meteor();

        }
        if(frame==14)
        {
            meteor();

        }
        if(frame==15)
        {
            meteor();

        }
        if(frame==16)
        {
            meteor();

        }
        if(frame==17)
        {
            meteor();

        }
        if(frame==17)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/ax/ax_mag2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

	if (frame<=4)

	{

	changeentityproperty(self, "velocity", -2, 0, -10);

	}

	if (frame>4)

	{

	changeentityproperty(self, "velocity", 0, 0, 0);

	}



//void self = getlocalvar("self");

	if (frame==11)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/ax/axmfake2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            meteor();

        }
        if(frame==1)
        {
            meteor();

        }
        if(frame==2)
        {
            meteor();

        }
        if(frame==3)
        {
            meteor();

        }
        if(frame==4)
        {
            meteor();

        }
        if(frame==5)
        {
            meteor();

        }
        if(frame==6)
        {
            damage(350, 90, "Ax");

        }
        if(frame==6)
        {
            meteor();

        }
        if(frame==7)
        {
            meteor();

        }
        if(frame==8)
        {
            meteor();

        }
        if(frame==9)
        {
            meteor();

        }
        if(frame==10)
        {
            ivartre(1);

        }
        if(frame==10)
        {
            meteor();

        }
        if(frame==11)
        {
            meteor();

        }
        if(frame==11)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/ax/ax_mag3.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            check();

        }
        return;
    }
    if(animnum==1)
    {
        if(frame==0)
        {
            target();

        }
        return;
    }
    if(animnum==81)
    {
        if(frame==5)
        {
            selfkill();

        }
        return;
    }
    if(animnum==23)
    {
        if(frame==5)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/ax/ax_mag4.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==10)
        {
            explode();

        }
        if(frame==12)
        {
            damage(500, 120, "Ax");

        }
        if(frame==17)
        {
            ivartre(1);

        }
        if(frame==26)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/tyris/ty_mag1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

	if (frame==9)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/tyris/tymfake1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            fall_fire();

        }
        if(frame==1)
        {
            fall_fire();

        }
        if(frame==2)
        {
            fall_fire();

        }
        if(frame==3)
        {
            fall_fire();

        }
        if(frame==4)
        {
            fall_fire();

        }
        if(frame==5)
        {
            fall_fire();

        }
        if(frame==6)
        {
            fall_fire();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/tyris/ty_mag2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

changeentityproperty(self, "velocity", -3, 0, 0);



if(frame == 4)

{

changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));

}

        return;
    }
    if(animnum==81)
    {


void self = getlocalvar("self");

changeentityproperty(self, "velocity", -3, 0, 0);



if(frame == 22)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/tyris/tymfake2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            aquila();

        }
        if(frame==1)
        {
            aquila();

        }
        if(frame==2)
        {
            aquila();

        }
        if(frame==3)
        {
            aquila();

        }
        if(frame==4)
        {
            aquila();

        }
        if(frame==5)
        {
            aquila();

        }
        if(frame==5)
        {
            damage(350, 90, "Tyris");

        }
        if(frame==6)
        {
            aquila();

        }
        if(frame==7)
        {
            aquila();

        }
        if(frame==8)
        {
            aquila();

        }
        if(frame==8)
        {
            ivartre(1);

        }
        if(frame==9)
        {
            aquila();

        }
        if(frame==10)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/tyris/ty_mag3.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==35)
        {
            damage(600, 150, "Tyris");

        }
        if(frame==38)
        {
            ivartre(1);

        }
        if(frame==42)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/tyris/ty_mag4.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==14)
        {
            sputa();

        }
        if(frame==27)
        {
            damage(800, 200, "Tyris");

        }
        if(frame==33)
        {
            ivartre(1);

        }
        if(frame==39)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/tyris/ty_mag42.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

	if (frame==23)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/gilius/gi_mag1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

//int frame = getentityproperty(self, "animpos");

	if (frame==7)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/gilius/gimfake1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            thunder();

        }
        if(frame==1)
        {
            thunder();

        }
        if(frame==2)
        {
            thunder();

        }
        if(frame==3)
        {
            thunder();

        }
        if(frame==4)
        {
            thunder();

        }
        if(frame==5)
        {
            thunder();

        }
        if(frame==6)
        {
            thunder();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/gilius/gi_3_alt.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==10)
        {
            palette(1);

        }
        if(frame==10)
        {
            FXspawn();

        }
        if(frame==12)
        {
            palette(0);

        }
        if(frame==17)
        {
            palette(1);

        }
        if(frame==17)
        {
            FXspawn();

        }
        if(frame==19)
        {
            palette(0);

        }
        if(frame==24)
        {
            palette(1);

        }
        if(frame==24)
        {
            FXspawn();

        }
        if(frame==26)
        {
            palette(0);

        }
        if(frame==27)
        {
            palette(1);

        }
        if(frame==27)
        {
            FXspawn();

        }
        if(frame==29)
        {
            palette(0);

        }
        if(frame==34)
        {
            palette(1);

        }
        if(frame==34)
        {
            FXspawn();

        }
        if(frame==36)
        {
            palette(0);

        }
        if(frame==40)
        {
            damage(250, 60, "Gilius");

        }
        if(frame==41)
        {
            ivartre(1);

        }
        if(frame==46)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/gilius/gi3alFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if(frame == 7)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/gilius/ginewmag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==35)
        {
            palette(1);

        }
        if(frame==36)
        {
            palette(0);

        }
        if(frame==37)
        {
            palette(1);

        }
        if(frame==38)
        {
            palette(0);

        }
        if(frame==46)
        {
            palette(1);

        }
        if(frame==47)
        {
            palette(0);

        }
        if(frame==65)
        {
            palette(1);

        }
        if(frame==66)
        {
            palette(0);

        }
        if(frame==67)
        {
            palette(1);

        }
        if(frame==68)
        {
            palette(0);

        }
        if(frame==74)
        {
            damage(370, 90, "Gilius");

        }
        if(frame==76)
        {
            palette(1);

        }
        if(frame==77)
        {
            palette(0);

        }
        if(frame==84)
        {
            ivartre(1);

        }
        if(frame==89)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/adder/ad_mag1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

//int frame = getentityproperty(self, "animpos");

	if (frame==17)

		{

		killentity(self);

		}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/adder/admfake1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            mano();

        }
        if(frame==1)
        {
            mano();

        }
        if(frame==2)
        {
            mano();

        }
        if(frame==3)
        {
            mano();

        }
        if(frame==4)
        {
            mano();

        }
        if(frame==5)
        {
            mano();

        }
        if(frame==6)
        {
            mano();

        }
        if(frame==7)
        {
            mano();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/adder/ad_mag2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

int maxenemy = openborvariant("ent_max");

void player;

int pindex;

void opp;

int en;

void opptype;

changeentityproperty(self, "velocity", 1, 0, 0);



if(frame==25)

{

  for(pindex=0; pindex<4; pindex++)

  {

  player=getplayerproperty(pindex, "entity");

	for(en=0; en<maxenemy; en++)

	{

	opp = getentity(en);

	opptype = getentityproperty(opp, "type");

	   if(getindexedvar(3)==0||getindexedvar(3)==NULL())

	   {

		     if(opptype==openborconstant("TYPE_ENEMY") && getentityvar(opp,10)!=1 /*vale "1" se l'enemy è fuori portata*/)

			 {

			 damageentity(opp, player, 250, 9, openborconstant("ATK_NORMAL3")); //mutilazione; "9" è un valore alto per knockdowncount>0

     			 }

	   }	

        if(getindexedvar(3)==2)

	    {

		     if(opptype==openborconstant("TYPE_PLAYER"))

			 {

			 damageentity(player, opp, 60, 9, openborconstant("ATK_NORMAL")); 

			 }

	    }	

	}

	

   }

}

if(frame==33)

{

setindexedvar(3,1);

}



if(frame==50)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/adder/ad_mag3.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

int maxenemy = openborvariant("ent_max");

//int dir = getentityproperty(self, "direction");

void player;

int pindex;

void opp;

int en;

void opptype;

if(frame > 25)

{

changeentityproperty(self, "velocity", 0.8, 0, 0);

}



if(frame==12+25)

{

  for(pindex=0; pindex<4; pindex++)

  {

  player=getplayerproperty(pindex, "entity");

	for(en=0; en<maxenemy; en++)

	{

	opp = getentity(en);

	opptype = getentityproperty(opp, "type");

	   if(getindexedvar(3)==0||getindexedvar(3)==NULL())

	   {

		     if(opptype==openborconstant("TYPE_ENEMY") && getentityvar(opp,10)!=1 /*vale "1" se l'enemy è fuori portata*/)

			 {

			 damageentity(opp, player, 400, 9, openborconstant("ATK_NORMAL3")); //mutilazione; "9" è un valore alto per knockdowncount>0

     			 }

	   }	

        if(getindexedvar(3)==2)

	    {

		     if(opptype==openborconstant("TYPE_PLAYER"))

			 {

			 damageentity(player, opp, 100, 9, openborconstant("ATK_NORMAL")); 

			 }

	    }	

	}

	

   }

}



if(frame==33+25)

{

setindexedvar(3,1);

}



if(frame==47+25)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/adder/ad_mag4.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==32)
        {
            damage(600, 150, "Adder");

        }
        if(frame==33)
        {
            ivartre(1);

        }
        if(frame==40)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/chronos/ch_mag1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==35)
        {
            damage(100, 45, "Chronos");

        }
        if(frame==36)
        {
            ivartre(1);

        }
        if(frame==42)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/chronos/ch_mag2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

int maxenemy = openborvariant("ent_max");

void player;

int pindex;

void opp;

int en;

void opptype;

changeentityproperty(self, "velocity", 2, 0, 0);



if(frame==30)

{

  for(pindex=0; pindex<4; pindex++)

  {

  player=getplayerproperty(pindex, "entity");

	for(en=0; en<maxenemy; en++)

	{

	opp = getentity(en);

	opptype = getentityproperty(opp, "type");

	   if((getindexedvar(3)==0||getindexedvar(3)==NULL()) && opptype==openborconstant("TYPE_ENEMY") && (getentityvar(opp,10)!=1 || getentityvar(opp,10)==NULL())/*vale "1" se l'enemy è fuori portata*/) 

	   {

	   damageentity(opp, player, 350, 9, openborconstant("ATK_NORMAL3")); //mutilazione; "9" è un valore alto per knockdowncount>0

   	   }	

           if(getindexedvar(3)==2 && opptype==openborconstant("TYPE_PLAYER"))

	   {

	   damageentity(player, opp, 90, 9, openborconstant("ATK_NORMAL"));

	   }	

	}

	

   }

}

if(frame==45)

{

setindexedvar(3,1);

}



if(frame==50)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/magic/chronos/ch_mag3.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==7)
        {
            sputa();

        }
        if(frame==23)
        {
            damage(350, 90, "Chronos");

        }
        if(frame==24)
        {
            ivartre(1);

        }
        if(frame==35)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/magic/chronos/toroFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

changeentityproperty(self, "velocity", 2, 0, 0);



if(frame==50)

killentity(self);

        return;
    }

}

####animationscript function main#####
# data/varie/magic/chronos/aqFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if(frame==38)

killentity(self);

        return;
    }

}

####animationscript function main#####
# data/varie/magic/chronos/leoFX.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if(frame==28)

killentity(self);

        return;
    }

}

####animationscript function main#####
# data/chars/mask/tiger.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

int dir = getentityproperty(self, "direction");

if(frame == 1)

{

killentity(self);

}

if(dir==0)

{

changeentityproperty(self, "velocity", -1.8, 0, 0);

}

if(dir==1)

{

changeentityproperty(self, "velocity", 1.8, 0, 0);

}

        return;
    }

}

####animationscript function main#####
# data/varie/images/players/axpan.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "velocity", 2, 0, 0);

}

if(frame==1)

{

changeentityproperty(self, "velocity", 0, 0, 0);

}

if(frame==2)

{

changeentityproperty(self, "velocity", 3, 0, 0);

}



if (frame==3)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/images/players/typan.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "velocity", 2, 0, 0);

}

if(frame==1)

{

changeentityproperty(self, "velocity", 0, 0, 0);

}

if(frame==2)

{

changeentityproperty(self, "velocity", 3, 0, 0);

}



if (frame==3)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/images/players/gipan.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "velocity", 2, 0, 0);

}

if(frame==1)

{

changeentityproperty(self, "velocity", 0, 0, 0);

}

if(frame==2)

{

changeentityproperty(self, "velocity", 3, 0, 0);

}



if (frame==3)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/images/players/adpan.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "velocity", 2, 0, 0);

}

if(frame==1)

{

changeentityproperty(self, "velocity", 0, 0, 0);

}

if(frame==2)

{

changeentityproperty(self, "velocity", 3, 0, 0);

}



if (frame==3)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/images/players/chpan.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "velocity", 2, 0, 0);

}

if(frame==1)

{

changeentityproperty(self, "velocity", 0, 0, 0);

}

if(frame==2)

{

changeentityproperty(self, "velocity", 3, 0, 0);

}



if (frame==3)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/images/players/mapan.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "velocity", 2, 0, 0);

}

if(frame==1)

{

changeentityproperty(self, "velocity", 0, 0, 0);

}

if(frame==2)

{

changeentityproperty(self, "velocity", 3, 0, 0);

}



if (frame==3)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/ampolla/ampolla.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/energie/f_energy.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/energie/m_energy.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/energie/l_energy.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }

}

####animationscript function main#####
# data/varie/atkup/atkup.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/defup/defup.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/chiave/chiave.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/soldi/soldi0.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/soldi/soldi1.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/soldi/soldi2.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/objects/card/card.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/varie/chiave/forziere.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");


int x = getentityproperty(self, "x");

int z = getentityproperty(self, "z");

int a = getentityproperty(self, "a");

int lx = openborvariant("xpos");

//int time = openborvariant("elapsed_time");

void name;

void e;

int i;

if(frame==0) 

{

setentityvar(self, 10, 1);//divento impossibile da colpire da magie/enemies in caduta/attacchi scriptati

}

if(frame==3)

	{

	i = 25+rand()%25; //da 0 a 50



	if(i>=0 && i <35)

		{

		name="a_lot_of_money";

		}

	if(i>=35 && i <=50)

		{

		name = "Card";

		}

	clearspawnentry();

	setspawnentry("name", name);

	setspawnentry("coords", x-lx, z+15, a);

	e=spawn();

	tossentity(e, 5, 0, 0);

	}

        return;
    }
    if(animnum==23)
    {


void self = getlocalvar("self");


int x = getentityproperty(self, "x");

int z = getentityproperty(self, "z");

int a = getentityproperty(self, "a");

int lx = openborvariant("xpos");

void name;

void e;

//int i;

if(frame==3)

	{

//	i = 25+rand()%25; //da 0 a 50



//	if(i>=0 && i<40)

//		{

		name = "few_money";

//		}

//	if(i>=40 && i <=50)

//		{

//		name = "some_money";

//		}

	clearspawnentry();

	setspawnentry("name", name);

	setspawnentry("coords", x-lx, z+15, a);

	e=spawn();

	tossentity(e, 5, 0, 0);

	}

        return;
    }

}

####animationscript function main#####
# data/varie/branch/select.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

int pindex = getentityproperty(self, "playerindex");

int kdown = 2;

int katt = 3;

void lev = getglobalvar("levelname");



//setindexedvar(4,0); INIZIALIZZATO IN animationscript "SELECT.H"

//setglobalvar("scene", "in_select"); INIZIALIZZATO IN animationscript "SELECT.H"



if(lev == "The_Forest" || lev == "Back_to_Forest")

{

changeentityproperty(self, "animpos", 0);

if(getindexedvar(4) == katt)

	{

//	//	setglobalvar("scene", "no_select"); //spostato in level.c //spostato in level.c

//	jumptobranch("sentiero", 1);

setglobalvar("levselect", "sentiero");

killentity(self);

	}

if(getindexedvar(4) == kdown)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW1"));

	}

}

if(lev == "The_Village" || lev == "Back_to_Village")

{

changeentityproperty(self, "animpos", 1);

if(getindexedvar(4) == katt)

	{

	//	setglobalvar("scene", "no_select"); //spostato in level.c //spostato in level.c

//	jumptobranch("salita", 1);

setglobalvar("levselect", "salita");

killentity(self);

	}

if(getindexedvar(4) == kdown)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));

	}

}

if(lev == "Mountains" || lev == "Back_to_Mountains")

{

changeentityproperty(self, "animpos", 2);

if(getindexedvar(4) == katt)

	{

	//	//	setglobalvar("scene", "no_select"); //spostato in level.c //spostato in level.c

//	jumptobranch("vulcano", 1);

setglobalvar("levselect", "vulcano");

killentity(self);

	}

if(getindexedvar(4) == kdown)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW3"));

	}

}

if(lev == "Flying_Dragon")

{

changeentityproperty(self, "animpos", 3);

if(getindexedvar(4) == katt)

	{

	//	//	setglobalvar("scene", "no_select"); //spostato in level.c //spostato in level.c

//	jumptobranch("mare", 1);

setglobalvar("levselect", "mare");

killentity(self);

	}

if(getindexedvar(4) == kdown)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW4"));

	}

}

if(lev == "The_Marshland" || lev == "Back_to_Marshland")

{

changeentityproperty(self, "animpos", 4);

if(getindexedvar(4) == katt)

	{

	//	//	setglobalvar("scene", "no_select"); //spostato in level.c //spostato in level.c

//	jumptobranch("elevator", 1);

setglobalvar("levselect", "elevator");

killentity(self);

	}

if(getindexedvar(4) == kdown)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW5"));

	}

}

        return;
    }
    if(animnum==81)
    {


void self = getlocalvar("self");

int pindex = getentityproperty(self, "playerindex");

int kup = 1;

int katt = 3;

if(getindexedvar(4) ==kup)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_IDLE"));

	}

if(getindexedvar(4) ==katt)

	{

	//	//	setglobalvar("scene", "no_select"); //spostato in level.c //spostato in level.c

//	jumptobranch("carro", 1);

setglobalvar("levselect", "carro");

killentity(self);

	}

        return;
    }
    if(animnum==82)
    {


void self = getlocalvar("self");

int pindex = getentityproperty(self, "playerindex");

int kup = 1;

int katt = 3;

if(getindexedvar(4) ==kup)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_IDLE"));

	}

if(getindexedvar(4) ==katt)

	{

	//	setglobalvar("scene", "no_select"); //spostato in level.c

//	jumptobranch("funivia", 1);

setglobalvar("levselect", "funivia");

killentity(self);

	}

        return;
    }
    if(animnum==83)
    {


void self = getlocalvar("self");

int pindex = getentityproperty(self, "playerindex");

int kup = 1;

int katt = 3;

if(getindexedvar(4) ==kup)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_IDLE"));

	}

if(getindexedvar(4) ==katt)

	{

	//	setglobalvar("scene", "no_select"); //spostato in level.c

//	jumptobranch("ghiaccio", 1);

setglobalvar("levselect", "ghiaccio");

killentity(self);

	}

        return;
    }
    if(animnum==84)
    {


void self = getlocalvar("self");

int pindex = getentityproperty(self, "playerindex");

int kup = 1;

int katt = 3;

if(getindexedvar(4) ==kup)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_IDLE"));

	}

if(getindexedvar(4) ==katt)

	{

	//	setglobalvar("scene", "no_select"); //spostato in level.c

//	jumptobranch("pesci", 1);

setglobalvar("levselect", "pesci");

killentity(self);

	}

        return;
    }
    if(animnum==169)
    {


void self = getlocalvar("self");

int pindex = getentityproperty(self, "playerindex");

int kup = 1;

int katt = 3;

if(getindexedvar(4) ==kup)

	{

	changeentityproperty(self, "animation", openborconstant("ANI_IDLE"));

	}

if(getindexedvar(4) ==katt)

	{

	//	setglobalvar("scene", "no_select"); //spostato in level.c

//	jumptobranch("battle", 1);

setglobalvar("levselect", "battle");

killentity(self);

	}

        return;
    }

}

####animationscript function main#####
# data/varie/fire/fire.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int dir = getentityproperty(self, "direction");

if(dir == 1)

{

changeentityproperty(self, "velocity", 0.8, 0, 0);

}

if(dir == 0)

{

changeentityproperty(self, "velocity", -0.8, 0, 0);

}



if(frame==13)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/bdragon.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==1)
        {
            chngani();

        }
        return;
    }
    if(animnum==169)
    {
        if(frame==0)
        {
            bindent(20, 30, 0);

        }
        if(frame==0)
        {
            gogo(3);

        }
        if(frame==1)
        {
            unbind();

        }
        return;
    }
    if(animnum==81)
    {
        if(frame==0)
        {
            inv();

        }
        return;
    }
    if(animnum==36)
    {
        if(frame==0)
        {
            evoc("fumocav");

        }
        if(frame==2)
        {
            evoc("fumocav");

        }
        if(frame==4)
        {
            evoc("fumocav");

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==2)
        {
            attdrag();

        }
        return;
    }
    if(animnum==174)
    {
        if(frame==0)
        {
            bescape();

        }
        if(frame==1)
        {
            bescape();

        }
        if(frame==2)
        {
            bescape();

        }
        if(frame==3)
        {
            bescape();

        }
        if(frame==4)
        {
            bescape();

        }
        if(frame==5)
        {
            bescape();

        }
        if(frame==6)
        {
            bescape();

        }
        if(frame==7)
        {
            bescape();

        }
        if(frame==8)
        {
            bescape();

        }
        if(frame==9)
        {
            bescape();

        }
        if(frame==10)
        {
            bescape();

        }
        if(frame==11)
        {
            bescape();

        }
        if(frame==12)
        {
            bescape();

        }
        if(frame==13)
        {
            bescape();

        }
        if(frame==14)
        {
            bescape();

        }
        if(frame==15)
        {
            bescape();

        }
        if(frame==16)
        {
            bescape();

        }
        if(frame==17)
        {
            bescape();

        }
        if(frame==18)
        {
            bescape();

        }
        if(frame==19)
        {
            bescape();

        }
        if(frame==20)
        {
            bescape();

        }
        if(frame==21)
        {
            bescape();

        }
        if(frame==22)
        {
            bescape();

        }
        if(frame==23)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/scenes/ingame/scenes.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {
        if(frame==0)
        {
            sceneon();

        }
        if(frame==1)
        {
            sceneoff();

        }
        return;
    }

}

####animationscript function main#####
# data/chars/longmoan/longmoan.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==0)
        {
            espawn(0);

        }
        return;
    }
    if(animnum==0)
    {
        if(frame==0)
        {
            mapatt(4, 151, 169, 7, openborconstant("ANI_ATTACK5"));

        }
        if(frame==0)
        {
            mapatt(10, 65, 74, 26, openborconstant("ANI_ATTACK7"));

        }
        if(frame==0)
        {
            mapatp(9, 101, 119, 7, openborconstant("ANI_ATTACK8"));

        }
        if(frame==0)
        {
            mapatt(11, 16, 29, 7, openborconstant("ANI_ATTACK6"));

        }
        return;
    }
    if(animnum==1)
    {
        if(frame==0)
        {
            mapatt(4, 151, 169, 7, openborconstant("ANI_ATTACK5"));

        }
        if(frame==0)
        {
            mapatt(10, 65, 74, 26, openborconstant("ANI_ATTACK7"));

        }
        if(frame==0)
        {
            mapatp(9, 101, 119, 7, openborconstant("ANI_ATTACK8"));

        }
        if(frame==0)
        {
            mapatt(11, 16, 29, 7, openborconstant("ANI_ATTACK6"));

        }
        if(frame==0)
        {
            rescount();

        }
        return;
    }
    if(animnum==36)
    {
        if(frame==0)
        {
            unpredic();

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==1)
        {
            p_block(openborconstant("ANI_PAIN10"));

        }
        return;
    }
    if(animnum==82)
    {
        if(frame==2)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==3)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==4)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==5)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==6)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==7)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==8)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==9)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==10)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==11)
        {
            no_contr(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==8)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==9)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==161)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==10)
        {
            evoc("lcolte", 50, -1);

        }
        return;
    }
    if(animnum==162)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==164)
    {
        if(frame==4)
        {
            evoc("dvom", 53, 1);

        }
        return;
    }
    if(animnum==4)
    {
        if(frame==0)
        {
            counter(8, openborconstant("ANI_RUNATTACK"));

        }
        return;
    }
    if(animnum==34)
    {
        if(frame==0)
        {
            s_grab();

        }
        return;
    }
    if(animnum==5)
    {
        if(frame==0)
        {
            rescount();

        }
        return;
    }
    if(animnum==74)
    {
        if(frame==0)
        {
            t_grabbd();

        }
        return;
    }
    if(animnum==23)
    {
        if(frame==0)
        {
            t_grabbd();

        }
        return;
    }
    if(animnum==76)
    {
        if(frame==4)
        {
            premio();

        }
        return;
    }
    if(animnum==98)
    {
        if(frame==13)
        {
            premio();

        }
        return;
    }
    if(animnum==99)
    {
        if(frame==4)
        {
            premio();

        }
        return;
    }
    if(animnum==102)
    {
        if(frame==13)
        {
            premio();

        }
        return;
    }

}

####animationscript function main#####
# data/chars/heninger/heninger.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==0)
        {
            espawn(0);

        }
        return;
    }
    if(animnum==0)
    {
        if(frame==0)
        {
            mapatt(0, 81, 89, 7, openborconstant("ANI_ATTACK2"));

        }
        if(frame==0)
        {
            mapatt(3, 141, 169, 7, openborconstant("ANI_ATTACK3"));

        }
        if(frame==0)
        {
            mapatt(5, 121, 139, 7, openborconstant("ANI_ATTACK4"));

        }
        if(frame==0)
        {
            mapatt(9, 101, 119, 7, openborconstant("ANI_ATTACK5"));

        }
        return;
    }
    if(animnum==1)
    {
        if(frame==0)
        {
            mapatt(0, 81, 89, 7, openborconstant("ANI_ATTACK2"));

        }
        if(frame==0)
        {
            mapatt(3, 141, 169, 7, openborconstant("ANI_ATTACK3"));

        }
        if(frame==0)
        {
            mapatt(5, 121, 139, 7, openborconstant("ANI_ATTACK4"));

        }
        if(frame==0)
        {
            mapatt(9, 101, 119, 7, openborconstant("ANI_ATTACK5"));

        }
        if(frame==0)
        {
            rescount();

        }
        return;
    }
    if(animnum==36)
    {
        if(frame==0)
        {
            unpredic();

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==2)
        {
            p_block(openborconstant("ANI_PAIN10"));

        }
        return;
    }
    if(animnum==8)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==9)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==2)
        {
            evoc("hesass", 55, 1);

        }
        return;
    }
    if(animnum==10)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==161)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==2)
        {
            evoc("henbo", 45, 1);

        }
        return;
    }
    if(animnum==4)
    {
        if(frame==0)
        {
            counter(8, openborconstant("ANI_ATTACK2"));

        }
        return;
    }
    if(animnum==34)
    {
        if(frame==0)
        {
            s_grab();

        }
        return;
    }
    if(animnum==5)
    {
        if(frame==0)
        {
            rescount();

        }
        return;
    }
    if(animnum==74)
    {
        if(frame==0)
        {
            t_grabbd();

        }
        return;
    }
    if(animnum==76)
    {
        if(frame==4)
        {
            premio();

        }
        return;
    }
    if(animnum==98)
    {
        if(frame==13)
        {
            premio();

        }
        return;
    }
    if(animnum==99)
    {
        if(frame==4)
        {
            premio();

        }
        return;
    }
    if(animnum==102)
    {
        if(frame==13)
        {
            premio();

        }
        return;
    }

}

####animationscript function main#####
# data/chars/maghini/mago.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==0)
        {
            espawn(1);

        }
        if(frame==0)
        {
            starttime();

        }
        if(frame==0)
        {
            ientvar(10, 1);

        }
        return;
    }
    if(animnum==0)
    {
        if(frame==0)
        {
            endtime();

        }
        if(frame==0)
        {
            mapstand();

        }
        return;
    }
    if(animnum==1)
    {
        if(frame==0)
        {
            endtime();

        }
        return;
    }
    if(animnum==79)
    {
        if(frame==0)
        {
            endtime();

        }
        return;
    }
    if(animnum==81)
    {
        if(frame==5)
        {
            scappa();

        }
        return;
    }
    if(animnum==4)
    {
        if(frame==0)
        {
            scappa();

        }
        return;
    }
    if(animnum==174)
    {
        if(frame==0)
        {
            vel(10);

        }
        if(frame==0)
        {
            offscrn();

        }
        if(frame==17)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/chars/bigadder/bigadder.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==1)
        {
            ivarmod(9, 0);

        }
        if(frame==1)
        {
            VS("bapan");

        }
        return;
    }
    if(animnum==0)
    {
        if(frame==0)
        {
            mapatt(1, 111, 119, 36, openborconstant("ANI_ATTACK3"));

        }
        if(frame==0)
        {
            mapatt(1, 1, 49, 36, openborconstant("ANI_ATTACK5"));

        }
        if(frame==0)
        {
            mapatt(2, 121, 133, 36, openborconstant("ANI_ATTACK4"));

        }
        if(frame==0)
        {
            ientvar(10, 0);

        }
        return;
    }
    if(animnum==1)
    {
        if(frame==0)
        {
            mapatt(1, 111, 119, 36, openborconstant("ANI_ATTACK3"));

        }
        if(frame==0)
        {
            mapatt(1, 1, 49, 36, openborconstant("ANI_ATTACK5"));

        }
        if(frame==0)
        {
            mapatt(2, 121, 133, 36, openborconstant("ANI_ATTACK4"));

        }
        if(frame==0)
        {
            rescount();

        }
        if(frame==0)
        {
            unpredic();

        }
        if(frame==3)
        {
            fiatone();

        }
        return;
    }
    if(animnum==7)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==0)
        {
            furbetto();

        }
        if(frame==4)
        {
            p_block(openborconstant("ANI_PAIN"));

        }
        return;
    }
    if(animnum==8)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==9)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==5)
        {
            evoc("quake2", 0, 0);

        }
        return;
    }
    if(animnum==169)
    {
        if(frame==1)
        {
            evoc("quake2", 0, 0);

        }
        if(frame==6)
        {
            evoc("quake2", 0, 0);

        }
        if(frame==6)
        {
            sndhit();

        }
        return;
    }
    if(animnum==10)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        return;
    }
    if(animnum==161)
    {
        if(frame==0)
        {
            noflrise(openborconstant("ANI_FOLLOW3"));

        }
        if(frame==5)
        {
            evoc("quake2", 0, 0);

        }
        return;
    }
    if(animnum==4)
    {
        if(frame==0)
        {
            counter(8, openborconstant("ANI_ATTACK2"));

        }
        return;
    }
    if(animnum==23)
    {
        if(frame==0)
        {
            killed(1);

        }
        if(frame==25)
        {
            select("select", "The_Forest", "Back_to_Forest");

        }
        if(frame==26)
        {
            go_on();

        }
        if(frame==26)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/bgs/foresta/cespu.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==23)
    {


void self = getlocalvar("self");


int x = getentityproperty(self, "x");

int z = getentityproperty(self, "z");

int a = getentityproperty(self, "a");

int lx = openborvariant("xpos");

void name;

void e;

int i;

if(frame==1)

	{

	i = 25+rand()%25; //da 0 a 50

	if(i>=0 && i<20)

		{

		name = "Attack_Up";

		}

	if(i>=20 && i <=50)

		{

		name = "Defense_Up";

		}

	clearspawnentry();

	setspawnentry("name", name);

	setspawnentry("coords", x-lx, z+15, a);

	e=spawn();

	tossentity(e, 5, 0, 0);

	}

if(frame==10)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/chars/maghini/fata.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==0)
        {
            espawn(1);

        }
        if(frame==0)
        {
            ientvar(10, 1);

        }
        if(frame==0)
        {
            ngravity(1);

        }
        if(frame==5)
        {
            velv(0, 0, 0);

        }
        if(frame==7)
        {
            height();

        }
        if(frame==7)
        {
            ngravity(0);

        }
        return;
    }
    if(animnum==23)
    {
        if(frame==4)
        {
            antidote();

        }
        if(frame==6)
        {
            lessfata();

        }
        if(frame==7)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/objects/ampolla/poison.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/flame/flameBLU.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==0)
    {


void self = getlocalvar("self");

if (frame==15)

	{

	killentity(self);

	}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/axrider/axbdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{



//tentativo di forzatura pressione tasto per animazione

//int pindex = getplayerproperty(self, "playerindex");

//int temp = getplayerproperty(pindex, "playkeys");

//changeplayerproperty(pindex, "playkeys", temp + openborconstant("FLAG_ATTACK"));



changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/tyrider/tybdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/girider/gibdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{



//tentativo di forzatura pressione tasto per animazione

//int pindex = getplayerproperty(self, "playerindex");

//int temp = getplayerproperty(pindex, "playkeys");

//changeplayerproperty(pindex, "playkeys", temp + openborconstant("FLAG_ATTACK"));



changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/adrider/adbdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{



//tentativo di forzatura pressione tasto per animazione

//int pindex = getplayerproperty(self, "playerindex");

//int temp = getplayerproperty(pindex, "playkeys");

//changeplayerproperty(pindex, "playkeys", temp + openborconstant("FLAG_ATTACK"));



changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/chrider/chbdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{



//tentativo di forzatura pressione tasto per animazione

//int pindex = getplayerproperty(self, "playerindex");

//int temp = getplayerproperty(pindex, "playkeys");

//changeplayerproperty(pindex, "playkeys", temp + openborconstant("FLAG_ATTACK"));



changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/marider/mabdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{



//tentativo di forzatura pressione tasto per animazione

//int pindex = getplayerproperty(self, "playerindex");

//int temp = getplayerproperty(pindex, "playkeys");

//changeplayerproperty(pindex, "playkeys", temp + openborconstant("FLAG_ATTACK"));



changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/lonrider/lobdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }
    if(animnum==7)
    {


void self = getlocalvar("self");

int maxplayers = openborvariant("maxplayers");

int panim;

int pindex;

void ent;

for(pindex=0;pindex<maxplayers;pindex++)

{

 ent = getplayerproperty(pindex, "ent") ;

 if(ent) // if player # exists

{

panim = getentityproperty(ent, "animationid");

if(frame==0 && (panim == 4 || panim == 69 || panim == 70 || panim == 71))

{

changeentityproperty(self, "aiflag", "attacking", 0);


changeentityproperty(self, "aiflag", "idling", 1);
			

changeentityproperty(self, "takeaction", "normal_prepare");

changeentityproperty(self, "animation", openborconstant("ANI_IDLE"),1);

}

}

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/lonrider/hebdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }
    if(animnum==7)
    {


void self = getlocalvar("self");

int maxplayers = openborvariant("maxplayers");

int panim;

int pindex;

void ent;

for(pindex=0;pindex<maxplayers;pindex++)

{

 ent = getplayerproperty(pindex, "ent") ;

 if(ent) // if player # exists

{

panim = getentityproperty(ent, "animationid");

if(frame==0 && (panim == 4 || panim == 69 || panim == 70 || panim == 71))

{

changeentityproperty(self, "aiflag", "attacking", 0);


changeentityproperty(self, "aiflag", "idling", 1);
			

changeentityproperty(self, "takeaction", "normal_prepare");

changeentityproperty(self, "animation", openborconstant("ANI_IDLE"),1);

}

}

}

        return;
    }

}

####animationscript function main#####
# data/bgs/foresta/cespu.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==23)
    {


void self = getlocalvar("self");


int x = getentityproperty(self, "x");

int z = getentityproperty(self, "z");

int a = getentityproperty(self, "a");

int lx = openborvariant("xpos");

void name;

void e;

int i;

if(frame==1)

	{

	i = 25+rand()%25; //da 0 a 50

	if(i>=0 && i<20)

		{

		name = "Attack_Up";

		}

	if(i>=20 && i <=50)

		{

		name = "Defense_Up";

		}

	clearspawnentry();

	setspawnentry("name", name);

	setspawnentry("coords", x-lx, z+15, a);

	e=spawn();

	tossentity(e, 5, 0, 0);

	}

if(frame==10)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/chars/maghini/fata.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {
        if(frame==0)
        {
            espawn(1);

        }
        if(frame==0)
        {
            ientvar(10, 1);

        }
        if(frame==0)
        {
            ngravity(1);

        }
        if(frame==5)
        {
            velv(0, 0, 0);

        }
        if(frame==7)
        {
            height();

        }
        if(frame==7)
        {
            ngravity(0);

        }
        return;
    }
    if(animnum==23)
    {
        if(frame==4)
        {
            antidote();

        }
        if(frame==6)
        {
            lessfata();

        }
        if(frame==7)
        {
            selfkill();

        }
        return;
    }

}

####animationscript function main#####
# data/varie/objects/ampolla/poison.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==22)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

if(frame==1)

{

setentityvar(self, 3, time);

}

        return;
    }
    if(animnum==0)
    {


void self = getlocalvar("self");

int time = openborvariant("elapsed_time");

int stime = getentityvar(self, 3);

if(time - stime >=2000/*10 secondi*/)

{

changeentityproperty(self, "blink", 1);

}

if(time - stime >=3000/*15 secondi*/)

{

killentity(self);

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/lonrider/lobdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }
    if(animnum==7)
    {


void self = getlocalvar("self");

int maxplayers = openborvariant("maxplayers");

int panim;

int pindex;

void ent;

for(pindex=0;pindex<maxplayers;pindex++)

{

 ent = getplayerproperty(pindex, "ent") ;

 if(ent) // if player # exists

{

panim = getentityproperty(ent, "animationid");

if(frame==0 && (panim == 4 || panim == 69 || panim == 70 || panim == 71))

{

changeentityproperty(self, "aiflag", "attacking", 0);


changeentityproperty(self, "aiflag", "idling", 1);
			

changeentityproperty(self, "takeaction", "normal_prepare");

changeentityproperty(self, "animation", openborconstant("ANI_IDLE"),1);

}

}

}

        return;
    }

}

####animationscript function main#####
# data/chars/CAV/bdragon/lonrider/hebdrag.txt
########################################
void main()
{
    int frame = getlocalvar("frame");
    int animnum = getlocalvar("animnum");
    if(animnum==81)
    {


void self = getlocalvar("self");

if(frame==0)

{

changeentityproperty(self, "invincible", 1);

changeentityproperty(self, "blink", 0);

changeentityproperty(self, "invinctime", 300+openborvariant("elapsed_time"));

}

        return;
    }
    if(animnum==7)
    {


void self = getlocalvar("self");

int maxplayers = openborvariant("maxplayers");

int panim;

int pindex;

void ent;

for(pindex=0;pindex<maxplayers;pindex++)

{

 ent = getplayerproperty(pindex, "ent") ;

 if(ent) // if player # exists

{

panim = getentityproperty(ent, "animationid");

if(frame==0 && (panim == 4 || panim == 69 || panim == 70 || panim == 71))

{

changeentityproperty(self, "aiflag", "attacking", 0);


changeentityproperty(self, "aiflag", "idling", 1);
			

changeentityproperty(self, "takeaction", "normal_prepare");

changeentityproperty(self, "animation", openborconstant("ANI_IDLE"),1);

}

}

}

        return;
    }

}
